package com.weiyuwqj.server.mapper;

import com.weiyuwqj.api.model.BasUserInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Map;
@Repository
public interface BasUserInfoMapper extends Mapper<BasUserInfo> {
    BasUserInfo getByInviteCode(String inviteCode);

    //根据userId查询单条信息
    BasUserInfo getOneByUserId(Integer userId);

    //修改openId
    Integer modifyOpenIdByUserId(BasUserInfo info);

    //根据userId修改提现限制
    Integer modifyCashLimit(@Param("newStatus")Integer newStatus,@Param("oldStatus")Integer oldStatus,@Param("userId")Integer userId);


    //根据userId修改出生地，居住地
    Integer modifyAddressByUserId(BasUserInfo info);

    void updatePhoto(@Param("userId")Integer userId, @Param("url") String url);

    void addOpenIdByUserId(Map map);
}